The present invention relates to an apparatus for and a method of performing a character segmentation of each character of a character string. This invention also relates to an apparatus for and a method of extracting a character string.
In recent years, demand has been increasing for a handwritten character recognizing apparatus. The handwritten character recognizing apparatus recognizes a character by segmenting each character of a character string composed of a plurality of characters. In this case, a process important for precisely recognizing each character involves a segmentation of each character.
According to the prior art, a writer who writes characters writes a character finely in a character frame of a document in which character writing positions are designated beforehand. When segmenting the written character, the above character recognizing apparatus calculates, as a character size for recognizing the character, a simple average of a maximum character rectangle in the character string or of a character rectangle in the character string. The related art character recognizing apparatus segments the character by calculating a pitch between the characters, then integrates the character.
For example, Japanese Patent Laid-Open No. 4-098477 discloses a known technology of calculating the intercharacter pitch. According to this known technology, a one-dimensional projection is effected on a character pattern. The character pitch is calculated by an interval between a white pixel and a black pixel that is thus obtained. Further, Japanese Patent Laid-Open No. 60-173685 discloses a technology in which the character pitch is estimated by performing a one-dimensional Fourier transform on image data of a document. Japanese Patent Laid-Open No. 62-195893 discloses a technology wherein a character segmenting position is searched within an estimated range by defining the estimated range in which the character is to be segmented based on data about a height of the character string.
On the other hand, Japanese Patent Laid-Open No. 4-017086 discloses a known technology of integrating the character. According to this known technology, rectangles bordering the extremities of segment patterns (hereinafter, referred to as the rectangles) are integrated based on a character size and a character pitch by extracting the circumscribed rectangles of the black pixels that are to be connected.
As described above, the respective characters written in the character frames arranged at equal intervals are segmented by the character segmenting method; it is therefore possible to recognize the character with considerable accuracy.
In addition, it is troublesome for the writer writing the characters to finely write each character in the character frame. Therefore, the writer writes the characters at a free pitch on the sheet with no character frame. The characters written at the free pitch are formed comparatively large and small, overlapped with each other and contacted with each other. In addition, an overhang is produced in which the characters are contiguous to each other. Further, a separation stroke is produced in which one numeral is separated into a plurality of patterns.
When using the conventional character segmenting method for the character string in which the characters are written at the free pitch, however, the following problems arise. First, the maximum rectangle in the character string is employed as a fiducial character size with respect to the character string in which a character size fluctuates. In this case, if even one character that is extremely large exists, this large character turns out to be the fiducial character size. This large character size is not proper as a size when integrating the character.
Further, if an average character size is simply calculated with respect to the character string having a multiplicity of small segment patterns of points or the like, the average character size undergoes an influence of the small size rectangles of the points or the like. For this reason, it follows that the average character size is calculated smaller than an actual size.
Moreover, in the case of calculating the pitch by the one-dimensional projection with respect to the character string having the overhang, a boundary between the white pixel and the black pixel does not appear. Consequently, a problem of causing a decrease in a character recognizing factor exists.
Further, according to the method of defining the estimated range in which the character should be segmented based on the height data of the character string, a handwritten Chinese character and a printed character exhibiting a high squareness present no problem. In the character string in which the character size of a handwritten numeral fluctuates largely, however, there is such a problem that the estimated range for the character segmentation is not clearly defined.
On the other hand, the following are conventional methods of extracting a character string. To start with, according to a first extracting method, a histogram is obtained by effecting a projection on the character in a horizonal or vertical direction, wherein the character on the document image is shown by the black pixels, while the background is shown by the white pixels. Then, in this method, the character string is extracted from a crest and a trough of the histogram.
According to a second extracting method, enlarging and contracting processes are executed a plurality of times on the black pixels, and a group of pixels obtained are employed as one character string. The second method is stated in a Treatise Journal 83/4 Vol.J66-D No.437-444, compiled by the Electronic Communications Association. According to a third extracting method, a circumscribed rectangle of a connection pattern is obtained, and a projection is applied to center coordinates thereof, wherein a weight is on an area of the rectangle. Then, this method is classified as a method of taking a peripheral distribution of obtained projection values. This method is stated in the Treatise Journal 85/12 Vol. J68-D No.12 2123-2131, compiled by the Electronic Communications Association.
If an up-and-down or right-and-left interval of the handwritten character strings is small, it may easily happen that a part of the character of a certain character string enters between the characters of an adjacent character string. In this case, the trough is hard to detect from the projected histogram by the above method of obtaining the histogram. Further, a shape of the histogram depends on an intricacy of the character.
Additionally, according to the method of performing the enlarging and contracting processes on the black pixels, it follows that all of the upper and lower character strings come in one group. In a method of taking a weighting projection of the rectangle center coordinates on the basis of the circumscribed rectangles of the connection pattern, weighting is effected on the only rectangular center. Hence, the character size data can not be read from a projection value. This leads to a problem in which a peripheral distribution range is hard to specify. Further, there are some characters in which the size of width fluctuates, although a height size is substantially fixed as in the case of a number. For those characters, the projection is applied to the rectangle center coordinates, wherein the weight is on a character area. For this reason, a problem of easily undergoing an influence of a laterally elongated character in the process of extracting the character string from the peripheral distribution exists.